@extends('layouts.tankuang')

@section('content')
    <table id="faren_form" title="" class="easyui-datagrid" style="width:100%;height:600px"
           data-options="rownumbers:true,singleSelect:true,pagination:true,pageSize:20,url:'{{url('admin/baoan/cailiao',$id)}}',method:'get'">
        <thead>
        <tr>
            <th data-options="field:'name'" width="70%" >档案名称</th>

            <th data-options="field:'查看更改'" width="30%" formatter="formatAction">操作</th>
        </tr>
        </thead>
    </table>

    <script type="text/javascript">

        function formatAction(value,row,index){
            return '<a class="easyui-linkbutton" iconCls="icon-edit" plain="true"  onclick="edit_zxup()">查看</a>';
        }

    </script>

    <div id="tk" class="easyui-window" closed="true" title="新增" data-options="iconCls:'icon-save'" style="width:800px;height:500px;padding:2px;overflow-x: hidden;"></div>

 
 	<script type="text/javascript" src="{{ URL::asset('/') }}js/weizhi.js"></script>
    <script type="text/javascript">

         function edit_zxup(){
            var row = $('#faren_form').datagrid('getSelected');
            var shuz = fb2();
            if (row) {
                var url = "{{url('admin/baoan/cailiao_list')}}"+"/"+row.up_id+'/'+"{{$id}}";
                $('#tk').window({
                    title: "材料列表",
                    href: url,
                    width:shuz[0],
					height:shuz[1],
					top:shuz[2],
					left:shuz[3],
                    minimizable:false,
                    modal:true,
                    closed: false,
                });
            }
        }

    </script>

    <script type="text/javascript">
        
        

        $("#faren_form").datagrid({

            onDblClickRow: function (index,row) {
                   var row = $('#faren_form').datagrid('getSelected');
                   var shuz = fb2();
                    if (row) {
                    var url = "{{url('admin/baoan/cailiao_list')}}"+"/"+row.up_id+'/'+"{{$id}}";
                    $('#tk').window({
                        title: "材料列表",
                        href: url,
                      	width:shuz[0],
						height:shuz[1],
						top:shuz[2],
						left:shuz[3],
                        minimizable:false,
                        modal:true,
                        closed: false,
                    });
                }

            }
        });






    </script>
@stop

